#define  _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
using namespace std;

#include"list.h"

void test1()
{
	lsg::list<int> It;
	It.push_back(1);
	It.push_back(2);
	It.push_back(3);
	It.push_back(4);

	lsg::list<int>::iterator it = It.begin();
	while (it != It.end())
	{
		cout << *it << " ";
		++it;
	}
	cout << endl;

	for (auto e : It)
	{
		cout << e << " ";
	}
	cout << endl;

	It.Print(It);
}

void test2()
{
	lsg::list<int> It;
	It.push_back(1);
	It.push_back(2);
	It.push_back(3);
	It.push_back(4);
	It.push_front(4);
	It.push_front(4);
	It.push_front(4);
	It.push_front(4);
	It.Print(It);

	cout << It.size() << endl;

	It.erase(It.begin());
	It.erase(It.begin());
	It.erase(It.begin());
	It.Print(It);
	cout << It.size() << endl;

	//It.clear();
	//cout << It.size() << endl;

	lsg::list<int> It1(It);
	for (auto e : It1)
	{
		cout << e << " ";
	}
	cout << endl;

	lsg::list<int> It3;
	It3 = It1;
	for (auto e : It3)
	{
		cout << e << " ";
	}
	cout << endl;
}

int main()
{
	test1();
	return 0;
}
